package com.duowei.diandan.fragment.dialog;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatDialogFragment;

import com.duowei.diandan.R;
import com.duowei.diandan.db.AppDatabase;

public abstract class BaseDialogFragment extends AppCompatDialogFragment {

    private AppDatabase mDb;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setStyle(STYLE_NO_TITLE, R.style.DialogStyle);
        mDb = AppDatabase.getDatabase();
    }

    public AppDatabase getDb() {
        return mDb;
    }
}
